#pragma once
// -------------------------------------------------
// BlinKit - BlinKit Library
// -------------------------------------------------
//   File Name: scheduled_action_impl.h
// Description: ScheduledAction Class
//      Author: Ziming Li
//     Created: 2022-03-31
// -------------------------------------------------
// Copyright (C) 2022 MingYang Software Technology.
// -------------------------------------------------

#ifndef BLINKIT_SCHEDULED_ACTION_IMPL_H
#define BLINKIT_SCHEDULED_ACTION_IMPL_H

#include "third_party/quickjs/quickjs.h"

namespace blink {

class ScheduledAction
{
public:
    ScheduledAction(JSContext *ctx, JSValueConst thisVal, int argc, JSValueConst *argv);
    ~ScheduledAction(void);

    void execute(ExecutionContext*);
private:
    JSContext *m_ctx;
    JSValue m_thisVal, m_callback;
    std::vector<JSValue> m_args;
};

} // namespace blink

#endif // BLINKIT_SCHEDULED_ACTION_IMPL_H
